#include "../include/regs.h"

qword iregs[128];
float fregs[64];
double dregs[64];

void init()
{
	iregs[Code] = 0;
	iregs[Flag] |= (RUNNING + ZERO);
	iregs[Stack] = 0xffffff;
}
void changeFlags(byte reg)
{
	iregs[Flag] &= ~(ZERO + NEGATIVE + POSITIVE);
	long long val = iregs[reg & 0x7f];
	if (val == 0)
		iregs[Flag] |= ZERO;
	else if (val < 0)
		iregs[Flag] |= NEGATIVE;
	else
		iregs[Flag] |= POSITIVE;
}